<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<fieldset><legend>Playlist Options</legend>
Start Date: <input type="text" /> | 
<select name="category">
<option value="all">category: all</option>
<?php
$catQuery = mysql_query("SELECT * FROM `category` ORDER BY `category` ") or die(mysql_error());
while ($cat = mysql_fetch_array($catQuery)) {
?><option value="<?=$cat[id]?>"<?php if ($cat['default']) print(' selected="selected"') ?>><?=$cat[category]?></option>
<?php
}
?>
</select><br />
Start Time: <input type="text" /> | <br />
</fieldset>
</form>
<?php
if ($do === 'mkNewPlaylist') {
   $playTime = $_REQUEST[playDate].' '.$_REQUEST[playTime]; 
   mysql_query("INSERT INTO `playlist` 
      SET 
      `air_type`='5',
      `playtime`='".$playTime."' 
      ");
}
?>
<table id="testTable"><tr><td></td><td></td></tr></table>
<span id="playItem[0]"></span>
<img src="./themes/<?=$theme?>/img/blank.png" onLoad="randPlayTrk(0);" />

<?php 
$activePlayQuery = mysql_query("SELECT * FROM `playlist` WHERE (`playtime`>='".$nowstamp."') AND (`air_type`='5') ");
while ($activePlay = mysql_fetch_array($activePlayQuery)) {
   printf('Playlist @%s<br />', $activePlay[playtime]);
}
if (!$activePlay) { 
   echo('there are no active upcoming playlists. 
   <a href="?mode=mkManPlaylist&do=mkNewPlayist"></a> or view a list of upcoming playlists to edit.');
}
?><a onClick="showPlayMaker()">Create a new playlist</a>
<span id="playMaker" class="hidden">
<form name="mkPlaylist" action="?mode=mkManPlaylist" method="post">
<br />date: <input type="text" name="playDate" />
<br />time: <input type="text" name="playTime" />
<input type="hidden" name="do" value="mkNewPlaylist" />
<input type="submit" value="Create Playlist" />
</form>
</span>


<br /><span id="playChunkStatus[1]"><img src="./themes/<?=$theme?>/img/bracket-top-11x11.png" onClick="togglePlayChunk(1,3)" /></span><br />
<span id="playChunkStatus[2]"><img src="./themes/<?=$theme?>/img/bracket-middle-11x11.png"  onClick="togglePlayChunk(2,4)" /></span><br />
<span id="playChunkStatus[3]"><img src="./themes/<?=$theme?>/img/bracket-bottom-11x11.png"  onClick="togglePlayChunk(3,1)" /></span>
